﻿
Imports elpmis
Imports webctrl

Namespace httpFunctions

    Public Module javascriptshared
        Public Sub getinlinescript(ByVal ctx As context, ByRef inlineScript As inlineScript, _
                                   Optional ByVal pagename As String = "page", _
                                   Optional ByVal inlineScriptName As String = "inlineScript")
            Dim page As xhtmlpage = Nothing
            page = ctx.findVariable(Of xhtmlpage)(pagename)
            inlineScript = ctx.findVariable(Of inlineScript)(inlineScriptName)
            If Not page Is Nothing AndAlso inlineScript Is Nothing Then
                inlineScript = page.inlineScript()
            End If
        End Sub
    End Module
End Namespace